package com.sokal.easycare.modules.picture.entity;

import org.hibernate.validator.constraints.Length;
import java.util.List;
import com.google.common.collect.Lists;

import com.sokal.easycare.common.persistence.DataEntity;

/**
 * 图文内容Entity
 * 
 * @author liliangdong
 * @version 2017-03-22
 */
public class PicArticle extends DataEntity<PicArticle> {

	private static final long serialVersionUID = 1L;
	private String title; // 标题
	private PicCategory picCategory; // 所属栏目
	private String keywords; // 关键词
	private List<PicArticleFile> picArticleFileList = Lists.newArrayList(); // 子表列表

	public PicArticle() {
		super();
	}

	public PicArticle(String id) {
		super(id);
	}

	@Length(min = 1, max = 255, message = "标题长度必须介于 1 和 255 之间")
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public PicCategory getPicCategory() {
		return picCategory;
	}

	public void setPicCategory(PicCategory picCategory) {
		this.picCategory = picCategory;
	}

	@Length(min = 0, max = 255, message = "关键词长度必须介于 0 和 255 之间")
	public String getKeywords() {
		return keywords;
	}

	public void setKeywords(String keywords) {
		this.keywords = keywords;
	}

	public List<PicArticleFile> getPicArticleFileList() {
		return picArticleFileList;
	}

	public void setPicArticleFileList(List<PicArticleFile> picArticleFileList) {
		this.picArticleFileList = picArticleFileList;
	}
}